package main.Q1501_1600;

public class Q1521_1530 {
    public static void main(String[] args) {
        System.out.println("Question1521：");
        System.out.println("Question1522：");
        System.out.println("Question1523：在区间范围内统计奇数数目");
        System.out.println("Question1524：");
        System.out.println("Question1525：");
        System.out.println("Question1526：");
        System.out.println("Question1527：");
        System.out.println("Question1528：");
        System.out.println("Question1529：");
        System.out.println("Question1530：");
    }
}

class Question1523{
    public int countOdds(int low, int high) {
        int count=0;
        if (low==high&&low%2==0) return count;
        else if (low==high&&low%2!=0) return 1;
        if (low%2!=0&&high%2!=0) count=2+(high-low-1)/2;
        else if ((low%2!=0&&high%2==0)||(low%2==0&&high%2!=0)) count=1+(high-low-1)/2;
        else count=(high-low-1)/2+1;
        return count;
    }
}